package com.egao.common.module.marketPush.param;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author lym
 * @date 2024/5/27 14:51
 */
@Data
public class MarketPushRecordExport {

    @ApiModelProperty(value = "学号")
    private String xh;

    @ApiModelProperty(value = "查看状态")
    private String readState;

    @ApiModelProperty(value = "查看时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_MINUTE_PATTERN)
    private Date readTime;

    @ApiModelProperty(value = "发送状态")
    private String state;

    @ApiModelProperty(value = "发送状态描述")
    private String description;

    @ApiModelProperty(value = "发送时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_MINUTE_PATTERN)
    private Date createTime;

    public String getState() {
        if ("0".equals(state)) {
            return "成功";
        } else {
            return "失败";
        }
    }
}
